[% setvar title Meanwhile, in perl6-language %]
<div id="archive-notice">
    <h3>This file is part of the Perl 6 Archive</h3>
    <p>To see what is currently happening visit <a href="http://www.perl6.org/">http://www.perl6.org/</a></p>
</div>
<div class='pod'>
<a name='The Perl 6 Summary for the week ending 2004-04-25'></a><h2>The Perl 6 Summary for the week ending 2004-04-25</h2>
<p>And we're back on a weekly schedule again (unless the Mayday bank
holiday knocks me for six next week). As I expected, the Apocalypse has
brought out a rash of prophets and prognosticators in perl6-language,
but perl6-internals is still ahead on number of messages per week.</p>
<a name='Constant Strings'></a><h2>Constant Strings</h2>
<p>I confess I'm not sure I quite understand the constant strings patches
that Leo Tötsch and Jeff Clites were discussing. I understand the bottom
line though -- they make parrot a lot quicker when comparing constant
strings. Huzzah!</p>
<p>Then it turned into a discussion of Unicode (or at least, Parrot string
handling which is almost, but not quite, the same thing).</p>
<p><a href='http://groups.google.com/groups?selm=A14A6816-91DA-11D8-8CC6-000393A6B9DA@mac.com' target='_blank'>groups.google.com</a></p>
<a name='Parrot m4 0.0.4'></a><h2>Parrot m4 0.0.4</h2>
<p>Bernhard Schmalhofer posted a patch to bring his parrot implementation
of m4 up to what he's calling version 0.0.4</p>
<p><a href='http://groups.google.com/groups?selm=rt-3.0.8-28971-85658.6.53100225472009@perl.org' target='_blank'>groups.google.com</a></p>
<a name='SDL Parrot status'></a><h2>SDL Parrot status</h2>
<p>Portland Parrot stalwart, chromatic, posted a link to a SDL Parrot site
he's set up with current status, downloadable snapshots and other good
SDL Parrot related things.</p>
<p><a href='http://wgz.org/chromatic/parrot/sdl/' target='_blank'>wgz.org</a></p>
<a name='Passing arrays of structs to NCI subs'></a><h2>Passing arrays of structs to NCI subs</h2>
<p>That man chromatic again, this time he asked if there was a secret
syntax for passing and retrieving arrays of things to and from NCI. Leo
noted that, according to the docs, there is no secret syntax, it's all
documented but unimplemented.</p>
<p><a href='http://groups.google.com/groups?selm=1082432832.32682.127.camel@localhost' target='_blank'>groups.google.com</a></p>
<a name='PMC Constants'></a><h2>PMC Constants</h2>
<p>Last week, Leo asked for comments on his proposal for PMC
constants. This week, Dan replied. Essentially he's all for the idea,
but wasn't sure which implementation strategy was the best choice.</p>
<p><a href='http://groups.google.com/groups?selm=a06100501bca9c8cae4e0@' target='_blank'>groups.google.com</a>[172.24.18.98]</p>
<a name='Assign and set'></a><h2>Assign and set</h2>
<p>Leo announced some changes he'd made to the behaviour of the <code>set</code> and
<code>assign</code> opcodes. Jens Rieks pointed out a case that he'd missed.</p>
<p><a href='http://groups.google.com/groups?selm=4084D4F2.50800@toetsch.at' target='_blank'>groups.google.com</a></p>
<a name='hyper op - proof of concept'></a><h2><code>hyper</code> op - proof of concept</h2>
<p>Leo also implemented what he described as a rather hackish and
incomplete new opcode called <code>hyper</code>. Dan liked it enough to suggest
that we should go the whole hog and add a hyper vtable to PMCs, with
hyper versions of all the standard vtable entries. He and Dan had a
long discussion of this, with contributions from various luminaries
including Larry. There was some debate as to whether we really needed
overridable hyper ops, but Dan's adamant that whatever happens they'll
be implemented in a vtable to allow for potential optimizations in some
cases.</p>
<p><a href='http://groups.google.com/groups?selm=408533A9.80909@toetsch.at' target='_blank'>groups.google.com</a></p>
<a name='Separating allocation and initialization of objects'></a><h2>Separating allocation and initialization of objects</h2>
<p>Last week, Leo posted the latest object benchmarks, and things were
fast. But there was one test where Python was faster. Analysis of the
results and the code seemed to point the finger at Parrot's combined
allocation and initialization. This week Dan confessed that he was
leaning towards separating the two because that would allow for a
standard PCC call into the initialization code. He pointed out that
there were still a few issues, but that appears to be the way he's
thinking.</p>
<p><a href='http://groups.google.com/groups?selm=a06100500bca98610f2e6@' target='_blank'>groups.google.com</a>[10.0.1.2]</p>
<a name='Another config task'></a><h2>Another config task</h2>
<p>Dan pointed out that the current config scheme relies rather heavily on
flags set in the current perl install, which isn't ideal. He suggested
that people might like to look into making Parrot's config step rather
less Perl dependent and pointed at things like 'metaconfig'.</p>
<p><a href='http://groups.google.com/groups?selm=a06100509bcab3286d112@' target='_blank'>groups.google.com</a>[10.0.1.2]</p>
<a name='Problems with the Perl 6 Compiler'></a><h2>Problems with the Perl 6 Compiler</h2>
<p>Allison Randal noted that <b><i>languages/perl6/</i></b> was failing all its
tests. The issue arose because the Perl 6 test module inherits from
Parrot::Test, and Parrot::Test's behaviour got changed recently. She
wondered why the changes had been made. After some discussion, Allison
provided a patch to make things work with the new Test module.</p>
<p><a href='http://groups.google.com/groups?selm=20040421071822.GA13915@shadowed.net' target='_blank'>groups.google.com</a></p>
<a name='IMCC temp optimizations...'></a><h2>IMCC temp optimizations...</h2>
<p>Dan is possibly the only person using Parrot in a commercial (mission
critical?) environment, using a compiler from a legacy language to
Parrot. He's currently experiencing problems with IMCC taking a long
time to compile the PIR generated by his compiler. Apparently it's
because he's using a lot of <code>.local</code>s and temps. He and Leo discussed
it back and forth to try and find optimizations (both of IMCC and of
Dan's compiler) for the issue. (Dramatic) progress was made.</p>
<p><a href='http://groups.google.com/groups?selm=a06100502bcacaa698e2c@' target='_blank'>groups.google.com</a>[172.24.18.98]</p>
<a name='Korean character set information'></a><h2>Korean character set information</h2>
<p>Last week, Dan had wished he had access to anyone who knew anything
about Korean. This week kj provided some information. The ensuing
discussion of Unicode (again, maybe I'm going to have to extend my &quot;I
don't cover the Unicode arguments&quot; policy from perl6-language to the
internals list too) led Jarkko Hietaniemi to propose that Parrot's
standard character set be cuneiform, with Phaistos disc symbols for
variable names.</p>
<p>I think he was joking.</p>
<p><a href='http://groups.google.com/groups?selm=6C95D067-93F0-11D8-BA46-000393583E38@cpan.org' target='_blank'>groups.google.com</a></p>
<a name='Containers and Values'></a><h2>Containers and Values</h2>
<p>The difference between containers and values cropped up again (for the
first time in a while actually). It got kicked off by a discussion of
what</p>
<pre>    my Joe $foo;
    $foo = 12; </pre>
<p>meant. It turns out that the <code>my Joe $foo;</code> part sets up a lexical
variable (called <code>$foo</code>), which points to a container (in this case a
Perl Scalar), which is constrained to contain either undef or a Joe
objects. I believe it's somewhat open as to whether <code>$foo = 12</code> is
legal and, if it isn't, when the decision about the legality of the
assignment would be made. Simon Cozens asked if the type declaration
information went with the variable or the value and the answer was
'neither', it goes with the container that the variable points
to. (Actually, that's not quite true, variables also know what type
the containers they point to should be constrained to holding, otherwise</p>
<pre>    my Dog $spot;
    my $feline = RSPCA.get_stray(Cat);
    $spot := $feline</pre>
<p>wouldn't throw an exception.) Dan noted that, right now, there is a
'muddled split' between values and containers in Parrot, which may well
come back to bite us in the future.</p>
<p><a href='http://groups.google.com/groups?selm=a06100510bcaebf236823@' target='_blank'>groups.google.com</a>[10.0.1.2]</p>
<a name='Dan Does Unicode'></a><h2>Dan Does Unicode</h2>
<p>After struggling manfully against the slings and arrows of outrageous
text representations, Dan finally choked down the Unicode bolus and
declared Unicode the &quot;One True Character String Encoding Set Stuff
Thingie&quot;. Not long after this he posted the shiny new, all Unicode,
all the time (ahem) strings design document.</p>
<p><a href='http://groups.google.com/groups?selm=a0610050fbcae19ec1dcd@' target='_blank'>groups.google.com</a>[10.0.1.2]</p>
<p><a href='http://groups.google.com/groups?selm=a06100505bcaf3db4412b@' target='_blank'>groups.google.com</a>[172.24.18.98]</p>
<a name='Meanwhile, in perl6-language'></a><h1>Meanwhile, in perl6-language</h1>
<a name='Backticks'></a><h2>Backticks</h2>
<p>Last week's thread rumbled on. Larry eventually made a ruling in favour
of <i>not</i> using <code>`</code> as an operator. He mentioned that the current
backticks behaviour 'probably needs to be completely rethought anyway',
and promised to cover it in a future Apocalypse. This didn't stop Austin
Hastings speculating, but a p6l without Austin speculating wouldn't be
the p6l we all know and love.</p>
<p><a href='http://groups.google.com/groups?selm=20040420175551.GA16162@wall.org' target='_blank'>groups.google.com</a></p>
<a name='Spaces in method calls'></a><h2>Spaces in method calls</h2>
<p>Late last week, Abhijit A Mahabal had wondered about one of the
examples of using method calls without brackets given in Apocalypse 12.
In particular, he wondered why</p>
<pre>    $obj.method ($x + $y) + $z</pre>
<p>was equivalent to</p>
<pre>    $obj.method(($x + $y) + $z) </pre>
<p>rather than</p>
<pre>    $obj.method($x + $y) + $z</pre>
<p>Larry was forthcoming with an explanation. He hoped it would be
possible to unambiguously define what is ambiguous.</p>
<p><a href='http://groups.google.com/groups?selm=Pine.GSO.4.58.0404171300130.13070@prickly.cs.indiana.edu' target='_blank'>groups.google.com</a></p>
<a name='Returning from Rules'></a><h2>Returning from Rules</h2>
<p>Luke Palmer noticed a common pattern in his grammar writing, where he
did a great deal of assigning a value to $0. He proposed that <code>&lt;{
some_thing() }&gt;</code> be redefined to assign the result from the block to
<code>$0</code>. Warnock applies.</p>
<p><a href='http://groups.google.com/groups?selm=20040419070629.GA32185' target='_blank'>groups.google.com</a>%luke@luqui.org</p>
<a name='Hyper mutating methods'></a><h2>Hyper mutating methods</h2>
<p>Matthew Walton wondered if the new <code>@things».method()</code> hyperized
method syntax also worked with mutating methods
(<code>@things».=method()</code>). Answer: Yes.</p>
<p><a href='http://groups.google.com/groups?selm=40839579.6020501@alledora.co.uk' target='_blank'>groups.google.com</a></p>
<a name='Placeholder attachment'></a><h2>Placeholder attachment</h2>
<p>Trey Harris asked for an explanation of placeholder attachment. Being
the gentleman he so obviously is, he even came up with a few thorny
examples. Larry answered that the rule of placeholders is simple:
Placeholders bind to the most closely surrounding closure. That is
all. If you want anything more complicated then arrow blocks (<code>-&gt;
$a, $b, $c { ... }</code>) are what you should be using.</p>
<p><a href='http://groups.google.com/groups?selm=20040418121909.U45731@bowser.eecs.harvard.edu' target='_blank'>groups.google.com</a></p>
<a name='Lvalue methods'></a><h2>Lvalue methods</h2>
<p>John Siracusa is after a neat way of overriding the assignment side of
an <code>is rw</code> attribute. Various proposals were batted about, including
using a different metaclass. Larry insisted that the
<code>$obj.foo($value)</code> was the wrong way of doing what <code>$obj.foo =
$value</code> does in A12 and repeated his reasoning for this. It looks like
John was reasonably happy with the 'different metaclass' approach
though.</p>
<p><a href='http://groups.google.com/groups?selm=041920042047.19015.40843AE60007FF9E00004A472200734076FF8D9E9898969DD19ED1948D9E@comcast.net' target='_blank'>groups.google.com</a></p>
<a name='Required Named Parameters Strike Back'></a><h2>Required Named Parameters Strike Back</h2>
<p>Way back in the mists of time, John Siracusa had argued forcefully for
required named parameters; required arguments to a function (or method)
that must be supplied as pairs rather than positionally. Apocalypse 12
gave him some grist for this particular mill and he reopened the
discussion with a long recap and extension of his argument.</p>
<p>Larry's response is a masterpiece of conciseness:</p>
<pre>   Well, actually, we saved you last summer when we decided to make +
   mean that the parameter must be named.</pre>
<p>Discussion continued after this of course, but it was mostly concerned
with making sure things worked as expected.</p>
<p><a href='http://groups.google.com/groups?selm=BCA98151.8DF37' target='_blank'>groups.google.com</a>%siracusa@mindspring.com</p>
<a name='Conflicting Attributes in Roles'></a><h2>Conflicting Attributes in Roles</h2>
<p>Jonathan Lang appeared to be shooting for the most cryptic question of
the week award when he simply posted a chunk of code. Austin thought he
understood it and essayed an answer. The resulting thread generated all
sorts of interesting stuff. Which is odd, because on rereading
Jonathan's original post, I don't think the code he wrote does what he
thinks it does.</p>
<p><a href='http://groups.google.com/groups?selm=20040421073558.43637.qmail@web40809.mail.yahoo.com' target='_blank'>groups.google.com</a></p>
<a name='Syntax to call attributes.'></a><h2>Syntax to call attributes.</h2>
<p>Jonathan Lang also wondered what the syntax was for accessing a list
attribute from a scalar object. Answer: The same was as you would
access any other attribute of that object; by calling a sigil free
method. (Which seems to imply that you either can't have all of
<code>$.foo</code>, <code>@.foo</code> and <code>%.foo</code> as attributes in the same class. Which
in turn looks like plain common sense to me.)</p>
<p><a href='http://groups.google.com/groups?selm=20040421074613.14250.qmail@web40807.mail.yahoo.com' target='_blank'>groups.google.com</a></p>
<a name='Lower case magic methods?'></a><h2>Lower case magic methods?</h2>
<p>Aldo Calpini worried that 'implicit' methods like <code>meta</code>,
<code>dispatch</code>, etc seem to break the rule that implicit things get UPPER
CASE (and some of the implicit methods have names that a programmer
might want for something else -- especially <code>dispatch</code>). Larry
confessed that the names were chosen for the very strong reason that he
&quot;hadn't thought about the issue yet&quot;. He went on to discuss things that
go into the Apocalypses as 'placeholders' -- he knows that more design
is needed, and there wants to be <i>something</i> there, but he hasn't
necessarily got the name right yet. He went on to make like a disabled
octopus, offering six hands worth of reasons for choosing different
rules for naming the various structural methods. No decision yet, but
now we know that Larry's thinking about it...</p>
<p><a href='http://groups.google.com/groups?selm=1082708715.7321.165.camel@localhost' target='_blank'>groups.google.com</a></p>
<a name='Subtypes that lack methods or roles'></a><h2>Subtypes that lack methods or roles</h2>
<p>Jonathan Lang wanted to know how to declare a &quot;subtype of a class which
messes with the dispatching mechanism to exclude certain methods and/or
roles from it&quot;. I want to know whether the class he's subtyping is the
one that messes with the dispatching, of if the new class is the one
that does the messing. I appear not to have been the only one confused
by the question: Larry asked Jonathan for some sample code, which he
did. Only to have the underlying design criticised by Dov Wasserman and
chromatic, who argued that what Jonathan was asking how to do was
exactly the thing that Roles were designed to avoid in the first place
by pulling orthogonal behaviour out into roles and then composing them
in classes.</p>
<p><a href='http://groups.google.com/groups?selm=20040423220723.74937.qmail@web40802.mail.yahoo.com' target='_blank'>groups.google.com</a></p>
<a name='Delegation using arrays'></a><h2>Delegation using arrays</h2>
<p>Austin Hastings voiced his misgivings about the A12 magic for
delegating to an array attribute. After a short discussion with Larry,
a light went on over Austin's head.</p>
<p><a href='http://groups.google.com/groups?selm=ICELKKFHGNOHCNCCCBKFCEPBCLAA.Austin_Hastings@Yahoo.com' target='_blank'>groups.google.com</a></p>
<a name='Typed undef'></a><h2>Typed undef</h2>
<p>Austin Hastings had a few things to say about typed undefs (the things
that get made when you do <code>my Dog $spot</code>), he liked the idea of being
able to call class methods on a typed undef for instance. The thread
went on to discuss other tricks with flavoured undefs, like undefs that
contain unthrown exceptions so that, when someone finally checks their
return value, they can examine the exception to find out what it was
that failed in the first place.</p>
<p><a href='http://groups.google.com/groups?selm=ICELKKFHGNOHCNCCCBKFGEPCCLAA.Austin_Hastings@Yahoo.com' target='_blank'>groups.google.com</a></p>
<a name='Universal Exports'></a><h2>Universal Exports</h2>
<p>Aaron Sherman had questions about the new export syntax discussed at
the end of A12. In particular, he wondered how he'd go about
reexporting a symbol that a module imports from somewhere
else. Discussion and sketchy design occurred in the ensuing thread.</p>
<p><a href='http://groups.google.com/groups?selm=1082757015.2899.589.camel@pps' target='_blank'>groups.google.com</a></p>
<a name='MethodMaker techniques in Perl 6'></a><h2>MethodMaker techniques in Perl 6</h2>
<p>John Siracusa wondered how he'd go about writing a Class::MethodMaker
equivalent in Perl6. (Personally, I'd roll my own subclass of
Class and MetaClass). Discussion followed, but I don't think they came
up with any implementation techniques yet.</p>
<p><a href='http://groups.google.com/groups?selm=1082909712.21945.1516.camel@localhost.localdomain' target='_blank'>groups.google.com</a></p>
<a name='Announcements, Acknowledgements, Apologies'></a><h1>Announcements, Acknowledgements, Apologies</h1>
<p>I'm sorry, but there's no announcements this week.</p>
<p>If you find these summaries useful or enjoyable, please consider
contributing to the Perl Foundation to help support the development of
Perl. You might also like to send me feedback at
mailto:<a href='mailto:pdcawley@bofh.org.uk'>pdcawley@bofh.org.uk</a></p>
<p><a href='http://donate.perl-foundation.org/' target='_blank'>donate.perl-foundation.org</a> -- The Perl Foundation</p>
<p><a href='http://dev.perl.org/perl6/' target='_blank'>dev.perl.org</a> -- Perl 6 Development site</p>
</div>
